﻿using System;
using System.ComponentModel;
using System.Linq.Expressions;

namespace NanoMvvm.ComponentModel
{
    public interface IDynamicViewModel<TModel> : INotifyPropertyChanged where TModel : class
    {
        TModel WrappedModel { get; }

        void WrapAllProperties();

        void WrapProperty<T>(Expression<Func<TModel, T>> selectorExpression);
        void WrapProperty<T>(Expression<Func<TModel, T>> selectorExpression, Expression<Func<TModel, T>>[] affectedPropertiesSelectors);

        T GetWrappedValue<T>(Expression<Func<TModel, T>> selectorExpression);
        void SetWrappedValue<T>(Expression<Func<TModel, T>> selectorExpression, T value);
    }
}